﻿namespace AgileZen.Models
{
    using System.Runtime.Serialization;

    [DataContract(Name="tag")]
    public class Tag : AgileZenModel
    {
        private int _id;
        private string _name;

        [DataMember(Name = "id", Order = 0, EmitDefaultValue = false)]
        public int Id
        {
            get { return _id; }
            set { _id = value; NotifyPropertyChanged("Id"); }
        }

        public bool ShouldSerializeId()
        {
            return PropertiesChanged.Contains("Id");
        }

        [DataMember(Name = "name", Order = 1, EmitDefaultValue = false)]
        public string Name
        {
            get { return _name; }
            set { _name = value; NotifyPropertyChanged("Name"); }
        }

        public bool ShouldSerializeName()
        {
            return PropertiesChanged.Contains("Name");
        }
    }
}
